# 密码长度校验, 需要超过八位数, 给对应的提示, 需要有输入
password = input("请输入密码: ")
try:
    if len(password) < 8:
        raise Exception("密码长度不够")
except Exception as e:
    print(e)